const fs = require("fs");

const writeStream = fs.createWriteStream("./stream-file/writeStream.txt", {
  // mac上面是没有问题
  // flags: 'a+',
  // window上面是需要使用r+
  flags: "r+", // flags: 'r+': 文件为空时才可写入
  start: 3, // 从第几个字节开始写
});

writeStream.write("hello createWriteStream");
writeStream.close();
